<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="CityFly">
  <xsl:output method="html" encoding="utf-8" />
  <msxsl:script language="javascript" implements-prefix="user">var n=6;
    var mR={MAXROW};
    function PageList(cP,rC,sQuery)    
    {
    var pC=(rC%mR==0)?rC/mR:long(rC/mR)+1;
    var pStr='&lt;span class="count">每页{MAXROW}张，第&lt;b&gt;'+cP+'&lt;/b&gt;/'+pC+'页&lt;/span>';
    
    var upStr = '&lt;img border="0" src="/images/v1/common/prepage.gif" align="absmiddle"/&gt;',downStr='&lt;img border="0" src="/images/v1/common/bg6.gif" align="absmiddle"/&gt;';
    cP=long(cP);
    var sP= (cP-n>0)?cP-n:1;
    var eP= (pC>cP+n)?cP+n:pC;
    pStr = pStr +'&lt;a '+((cP>1)?('href="?page='+(cP-1)+sQuery+'"' ):' class="disabled"')+'&gt;' + upStr+'&lt;/a&gt;';
    for (var i=sP;i&lt;=eP;i++)    
    {
    pStr=pStr+'&lt;a '+((i==cP)?'class="current"':'class="pagenum"')+' href="?Page='+i+sQuery+'"&gt;'+i+'&lt;\/a&gt;';
    }
    pStr = pStr + '&lt;a '+((pC>cP)?('href="?page='+(cP+1)+sQuery+'"' ):' class="disabled"')+'&gt;' + downStr+'&lt;/a&gt;';
    return pStr;
    }
    function getFileName(FullFileName){
    if(FullFileName=='')return '';
    var i = FullFileName.lastIndexOf('/');
    var s = FullFileName.substring(i+1);
    i = s.indexOf('_')
    return s.substring(i+1);
    }
    </msxsl:script>
    <xsl:param name="rowcount"/>
    <xsl:param name="curpage"/>
  <xsl:template match="/">
    <form id="form1">
      <div class="h">请选择你已经上传的文件：</div>
      <ul class="win">
        <xsl:for-each select="rows/row">
          <li style="width:104px;height:100px;"><img alt="{user:getFileName(string(F_Url))}" border="0" src="/Thumbnail/{F_Url}" width="100" height="75">
            <xsl:attribute name="title"><xsl:value-of select="F_Url"/>&#13;&#10;上传：<xsl:value-of select="substring(F_UploadTime,1,16)"/></xsl:attribute>
            </img><br />
            <input name="radioselect" onclick="$('imgValue').value='{F_Url}'" type="radio"/><xsl:value-of select="user:getFileName(string(F_Url))"/>
          </li>
        </xsl:for-each>
        <li class="clearfix">&nbsp;</li>
      </ul>
      <div class="pagelist"><xsl:value-of select="user:PageList($curpage,$rowcount,'')" disable-output-escaping="yes"/></div>
    </form><input id="imgValue" name="imgValue" type="hidden" value="" />
  </xsl:template>
</xsl:stylesheet>